<?php



namespace App\Services\Business\Models;


use App\Services\Business\Models\Base;
use Illuminate\Database\Eloquent\Factories\HasFactory;


class Image extends Base
{
    use HasFactory;

    protected $table = 'images';

    protected $fillable = [
         'url','title','media_id','id','small_url'
    ];

    protected $appends = [
        'path','path_small'
    ];



    public function getPathAttribute()
    {

        return   parse_url($this->url, PHP_URL_PATH);
    }

    public function getPathSmallAttribute()
    {

        return   parse_url($this->url_small, PHP_URL_PATH);
    }




}
